const option = {
  backgroundColor: 'rgb(43, 51, 59)',
  toolbox: {
    show: true,
    feature: {
      mark: {
        show: true,
      },
      dataView: {
        show: true,
        readOnly: false,
      },
      magicType: {
        show: true,
        type: ['pie', 'funnel'],
      },
      restore: {
        show: true,
      },
      saveAsImage: {
        show: true,
      },
    },
  },
  calculable: true,
  tooltip: {
    trigger: 'item',
    formatter: '{a}<br/>{b}:{c}千万元',
  },
  title: {
    text: '南丁格尔玫瑰图--PieHalfRose',
    left: 'center',
    top: 20,
    textStyle: {
      color: '#ccc',
    },
  },
  legend: {
    icon: 'circle',
    x: 'center',
    y: '5%',
    data: [
      '义乌市',
      '温州市',
      '台州市',
      '杭州市',
      '衢州市',
      '嵊州市',
      '嘉兴市',
      '丽水市',
      '龙港市',
    ],
    textStyle: {
      color: '#fff',
    },
  },
  series: [
    {
      name: '营业额',
      type: 'pie',
      radius: [37, 155],
      avoidLabelOverlap: false,
      startAngle: 0,
      center: ['50.1%', '34%'],
      roseType: 'area',
      selectedMode: 'single',
      label: {
        normal: {
          show: true,
          formatter: '{b}-{c}千万元',
        },
        emphasis: {
          show: true,
        },
      },
      labelLine: {
        normal: {
          show: true,
          smooth: false,
          length: 20,
          length2: 10,
        },
        emphasis: {
          show: true,
        },
      },
      data: [
        ...new Array(9).fill({
          value: 0,
          name: '',
          label: {
            show: false,
          },
          labelLine: {
            show: false,
          },
        }),
        {
          value: 1600.58,
          name: '义乌市',
          itemStyle: {
            normal: {
              color: '#f845f1',
            },
          },
        },
        {
          value: 1700.58,
          name: '温州市',
          itemStyle: {
            normal: {
              color: '#ad46f3',
            },
          },
        },
        {
          value: 1200.58,
          name: '台州市',
          itemStyle: {
            normal: {
              color: '#5045f6',
            },
          },
        },
        {
          value: 2000.58,
          name: '杭州市',
          itemStyle: {
            normal: {
              color: '#4777f5',
            },
          },
        },
        {
          value: 1000.58,
          name: '衢州市',
          itemStyle: {
            normal: {
              color: '#44aff0',
            },
          },
        },
        {
          value: 700.58,
          name: '嵊州市',
          itemStyle: {
            normal: {
              color: '#45dbf7',
            },
          },
        },
        {
          value: 1200.58,
          name: '嘉兴市',
          itemStyle: {
            normal: {
              color: '#f6d54a',
            },
          },
        },
        {
          value: 700.58,
          name: '丽水市',
          itemStyle: {
            normal: {
              color: '#f69846',
            },
          },
        },
        {
          value: 400,
          name: '龙港市',
          itemStyle: {
            normal: {
              color: '#ff4343',
            },
          },
        },
      ],
    },
  ],
};

export default option;
